#ifndef __MSG_H__
#define __MSG_H__
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>

#define MSG_SZ 64

struct msgbuf
{
    long mtype;         /* message type, must be > 0 */
    char mtext[MSG_SZ]; /* message data */
};

int msg_create();

int msg_send(int msgid, long mtype, char *buf);

int msg_rcv(int msgid, long mtype, char *buf, int len);

int msg_del(int msgid);
#endif